package com.czbank.financing.mapper;

import com.czbank.financing.Entity.Power;
import com.czbank.financing.Entity.Product;
import org.apache.ibatis.annotations.*;

import javax.annotation.Resource;
import java.util.Date;

/**
 * @Auther: thinkpad
 * @Date: 2019/7/13 02:01
 * @Description:
 */
@Resource(name="powerMapper")
public interface PowerMapper {
    @Select("SELECT * FROM power where pid = #{pid}")
    public Power findPowerInfo(@Param("pid") int pid);

    @Update("Update power set power_type = #{powerType} where pid =#{pid}")
    public int UpdatePowerInfo(@Param("pid") int pid,@Param("powerType") int powerType);

    @Delete("delete from power where pid=#{pid}")
    public int DeletePowerInfo(@Param("pid") int pid);

    @Insert("insert into power (power_type,creationtime) values(#{powerType},#{creationtime)")
    public int InsertPPowerInfo(@Param("powerType") int powerType,@Param("creationtime") Date creationtime);

}
